package com.example.adapter;

import java.util.List;

import org.w3c.dom.Text;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.example.music.R;

public class musicListAdapter extends BaseAdapter {
	private Context context;
	private int _id;
	private List<String> musicList;
	

	public musicListAdapter(Context context, int _id, List<String> musicList) {
		super();
		this.context = context;
		this._id = _id;
		this.musicList = musicList;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		// TODO Auto-generated method stub
		arg1 = LayoutInflater.from(context).inflate(_id, null);
		TextView textView =(TextView)arg1.findViewById(R.id.tv_musicName);
		for(int i=0;i<musicList.size();i++){
			textView.setText(musicList.get(i));
		}
		return arg1;
	}

}
